package vn.nt.healthcare.server.ws.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity(name = "Pregnant")
@Table(name = "pregnant")
public class Pregnant implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Integer Id;

	@OneToOne(cascade = CascadeType.ALL)
	private Customer customer;
	
	private Date female_date;
	private int period;
	private String state;
	private String weight;
	private String height;
	@Column(name = "type_blood")
	private String typeBlood;

	public Integer getId() {
		return Id;
	}

	public void setId(Integer id) {
		Id = id;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public Date getFemale_date() {
		return female_date;
	}

	public void setFemale_date(Date female_date) {
		this.female_date = female_date;
	}

	public int getPeriod() {
		return period;
	}

	public void setPeriod(int period) {
		this.period = period;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getWeight() {
		return weight;
	}

	public void setWeight(String weight) {
		this.weight = weight;
	}

	public String getHeight() {
		return height;
	}

	public void setHeight(String height) {
		this.height = height;
	}

	public String getTypeBlood() {
		return typeBlood;
	}

	public void setTypeBlood(String typeBlood) {
		this.typeBlood = typeBlood;
	}

	public String getMon() {
		if (customer != null)
			return this.customer.getFirstname() + " "
					+ this.customer.getLastname();
		else
			return "";
	}
}
